<!--#include file="./top.asp"-->

<%
	dim rs_student_ind, rs_rpt_language, str_student_ind, str_rpt_language
	set rs_student_ind = server.CreateObject("ADODB.Recordset")
	set rs_rpt_language = server.CreateObject("ADODB.Recordset")
	
	str_student_ind = "select * from student where stu_number = '" & request.QueryString("stu_id") & "'"
	str_rpt_language = "select * from ind_language where stu_id = '" & request.QueryString("stu_id") & "'"
	
	rs_student_ind.open str_student_ind, conn, 1 , 3
	rs_rpt_language.open str_rpt_language, conn, 1, 3

	if rs_rpt_language.eof then
		rs_rpt_language.addnew
		rs_rpt_language.fields("stu_id") = request.QueryString("stu_id")
		rs_rpt_language.update
		rs_rpt_language.close
		rs_rpt_language.open str_rpt_language, conn, 1, 3
	end If
		

%>

<!--#include file="./link_student_list.asp"-->

<form action="./update_rpt_language.asp?stu_id=<%=request.QueryString("stu_id")%>" method="post" name="frm_rpt_language">
<table border="1" width="80%">
	<tr>
  	<td>Language Information</td>
    <td>Name <%=rs_student_ind.fields("stu_ename")%></td>
  </tr>
  <tr>
  	<td>Mandarin</td>
    <td><input type="text" name="rs_rpt_language_1" value="<%=rs_rpt_language.fields("l_mandarin")%>" /></td>
  </tr>
  <tr>
  	<td>ENGLISH</td>
    <td><input type="text" name="rs_rpt_language_2" value="<%=rs_rpt_language.fields("l_english")%>" /></td>
  </tr>
  <tr>
  	<td>MATH</td>
    <td><input type="text" name="rs_rpt_language_3" value="<%=rs_rpt_language.fields("l_math")%>" /></td>
  </tr>
  <tr>
  	<td>EU</td>
    <td><input type="text" name="rs_rpt_language_4" value="<%=rs_rpt_language.fields("l_eu")%>" /></td>
  </tr>
  <tr>
  	<td>MUSIC</td>
    <td><input type="text" name="rs_rpt_language_5" value="<%=rs_rpt_language.fields("l_music")%>" /></td>
  </tr>
  <tr>
  	<td>ICT</td>
    <td><input type="text" name="rs_rpt_language_6" value="<%=rs_rpt_language.fields("l_ict")%>" /></td>
  </tr>
  <tr>
  	<td>PE</td>
    <td><input type="text" name="rs_rpt_language_7" value="<%=rs_rpt_language.fields("l_pe")%>" /></td>
  </tr>
  <tr>
  	<td>ART</td>
    <td><input type="text" name="rs_rpt_language_8" value="<%=rs_rpt_language.fields("l_art")%>" /></td>
  </tr>
  <tr>
  	<td colspan="2"><input type="submit" value="Submit" /></td>
  </tr>
</table>	

</form>
</body>
</html>
<%
	rs_student_ind.close
	set rs_student_ind = nothing
	rs_rpt_language.close
	set rs_rpt_language = nothing
	call closeconn()
%>